<div class="panel panel-default">
    <div class="panel-body">
        <div class="row">
            <form action="/node/list" method="get">
                <div class="col-md-9">
                </div>
                <div class="col-md-3">
                    <div class="input-group">
                        <input class="form-control" name="ip" type="text" value="{{.ip}}" placeholder="节点ip">
                        <span class="input-group-btn">
			              	<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i></button>
			            </span>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead>
            <tr>
                <th class="w8p">ID</th>
                <th class="w12p">节点IP</th>
                <th class="w7p">端口</th>
                <th class="w25p">Token</th>
                <th class="w13p">创建时间</th>
                <th>备注</th>
                <th class="w8p">状态</th>
                <th class="w11p">操作</th>
            </tr>
            </thead>
            <tbody>
            {{range $node := .nodes}}
                <tr data-row="{{$node.node_id}}">
                    <td class="center" data-name='node_id'>{{$node.node_id}}</td>
                    <td>{{$node.ip}}</td>
                    <td class="center">{{$node.port}}</td>
                    <td class="center"><strong class="text-danger">{{$node.token}}</strong></td>
                    <td class="center">{{dateFormat $node.create_time "Y-m-d H:i:s"}}</td>
                    <td>{{$node.comment}}</td>
                    <td class="center" data-name="status" data-row="{{$node.node_id}}">
                        <span class="label label-success">null</span>
                    </td>
                    <td class="center">
                        <a name="edit" class="glyphicon glyphicon-edit" data-link="/node/edit?node_id={{$node.node_id}}">修改</a>
                        <a onclick="Layers.confirm('确定删除吗？', '/node/delete?node_id={{$node.node_id}}');" class="remove glyphicon glyphicon-trash">删除 </a>
                    </td>
                </tr>
            {{end}}
            </tbody>
        </table>
    </div>
    <div class="panel-footer">
        {{template "paginator/default.html" .}}
    </div>
</div>
<script type="text/javascript" src="/static/style/module/node.js"></script>
<script type="text/javascript">
    Layers.bindIframe("[name='edit']", "修改节点信息", "480px", "940px");
    Node.GetStatus("/node/status");
    //    setInterval('Node.GetStatus("/node/status")', 5000);
</script>